function buildKernels_v2(dataset)
load(dataset);

[nSmp, nDim] = size(X);
if exist('y', 'var')
    Y = y;
end
PolynomialDegrees = [2, 4];
PolyPlusDegrees = [2, 4];
GaussianDegrees = 2.^[-3:3];

nKernel = 1 + length(PolynomialDegrees) + length(PolyPlusDegrees) + length(GaussianDegrees);

Ks = zeros(nSmp, nSmp, nKernel);

kernel_option = [];
kernel_option.KernelType = 'Linear';
Ks(:, :, 1) = constructKernel(X, [], kernel_option);

for i1 = 1:length(PolynomialDegrees)
    kernel_option = [];
    kernel_option.KernelType = 'Polynomial';
    kernel_option.d = PolynomialDegrees(i1);
    Ks(:, :, i1+1) = constructKernel(X, [], kernel_option);
end

for i1 = 1:length(PolyPlusDegrees)
    kernel_option = [];
    kernel_option.KernelType = 'PolyPlus';
    kernel_option.d = PolyPlusDegrees(i1);
    Ks(:, :, i1+length(PolynomialDegrees)+1) = constructKernel(X, [], kernel_option);
end

D = EuDist2(X, X, 1);
s = mean(D(:));

for i1 = 1:length(GaussianDegrees)
    kernel_option = [];
    kernel_option.KernelType = 'Gaussian';
    kernel_option.t = sqrt(GaussianDegrees(i1)) * s;
    Ks(:, :, i1+length(PolynomialDegrees)+length(PolyPlusDegrees)+1) = constructKernel(X, [], kernel_option);
end

save([dataset ,'_', num2str(nKernel) 'k.mat'], 'Ks', 'Y');